<?php
declare(strict_types=1);
namespace Service\DeclareService;
use Service\BaseService;
use Service\Code\Normal;
use App\Model\BbcModel\Order;
use App\Model\BbcModel\OrderReportStatus;
use App\Model\BbcModel\OrderReportLog;

/**
 * 申报日志
 * 
 */
class ReportLogService extends BaseService
{
    public function getLogByOrderIds(array $ids) {
        $reportlog = OrderReportLog::instance()
            ->whereIn('order_id', $ids)
            ->orderBy('id','desc')
            ->get()
            ->toArray();
        $data=[];
        foreach ($reportlog as $key => $value) {
            $data[$value['order_id']][]=[
                'id'=>$value['id'],
                'cd'=> date('Y-m-d H:i:s',$value['cd']),
                'content'=>$value['content']
            ];
        }
        return $data;
    }
}